Examining buprenorphine diversion through a harm reduction lens: an agent-based modeling study

Background Recent policies have lessened restrictions around prescribing buprenorphine-naloxone (buprenorphine) for the treatment of opioid use disorder (OUD). The primary concern expressed by critics of these policies is the potential for buprenorphine diversion. However, the population-level effects of increased buprenorphine diversion are unclear. If replacing the use of heroin or fentanyl, use of diverted buprenorphine could be protective. Methods Our study aim was to estimate the impact of buprenorphine diversion on opioid overdose using an agent-based model calibrated to North Carolina. We simulated the progression of opioid misuse and opioid-related outcomes over a 5-year period. Our status quo scenario assumed that 50% of those prescribed buprenorphine diverted at least one dose per week to other individuals with OUD and 10% of individuals with OUD used diverted buprenorphine at least once per week. A controlled prescription only scenario assumed that no buprenorphine would be diverted, while an increased diversion scenario assumed that 95% of those prescribed buprenorphine diverted and 50% of individuals with OUD used diverted buprenorphine. We assumed that use of diverted buprenorphine replaced the use of other opioids for that day. Sensitivity analyses increased the risk of overdose when using diverted buprenorphine, increased the frequency of diverted buprenorphine use, and simulated use of diverted buprenorphine by opioid-naïve individuals. Scenarios were compared on opioid overdose-related outcomes over the 5-year period. Results Our status quo scenario predicted 10,658 (credible interval [CI]: 9699–11,679) fatal opioid overdoses. A scenario simulating controlled prescription only of buprenorphine (i.e., no diversion) resulted in 10,741 (9895–11,650) fatal opioid overdoses versus 10,301 (9439–11,244) within a scenario simulating increased diversion. Compared to the status quo, the controlled prescription only scenario resulted in a similar number of fatal overdoses, while the scenario with increased diversion of buprenorphine resulted in 357 (3.35%) fewer fatal overdoses. Even when increasing overdose risk while using diverted buprenorphine and incorporating use by opioid naïve individuals, increased diversion did not increase overdoses compared to a scenario with no buprenorphine diversion. Conclusions A similar number of opioid overdoses occurred under modeling conditions with increased rates of buprenorphine diversion among persons with OUD, with non-statistical trends toward lower opioid overdoses. These results support existing calls for low- to no-barrier access to buprenorphine for persons with OUD. Supplementary Information The online version contains supplementary material available at 10.1186/s12954-023-00888-6.


Introduction
In North Carolina, overdose-related deaths have continued to grow over the last several years, with over 4,000 deaths in 2021 (https://www.ncdhhs.gov/opioid-and-substance-use-action-plandata-dashboard).Efforts to liberalize the prescription of buprenorphine-naloxone (buprenorphine) for the treatment of opioid use disorder is part of the national strategy to decrease opioid overdose deaths.However, policymakers have expressed concerns about these efforts leading to the diversion of buprenorphine.However, it is likely that the harmreduction benefit of diverted buprenorphine is greater than the risks associated with diversion as diverted buprenorphine could be used in place of heroin or fentanyl.The model herein described allows for investigation of buprenorphine diversion and its impact on fatalities and overdoses in North Carolina.
This supplement provides detailed information on modeling processes, parameter sources, and assumptions related to this analysis.The ABM incorporates a social network structure and transition matrix with agent interactions including dealer-user relationships, user networks, and access of medication through emergency departments, pharmacies, and other healthcare settings.This model is intended for use in examining long-term effects of prevention and treatment interventions on opioid misuse.This supplement accompanies a manuscript detailing an analysis simulating networks of buprenorphine diversion to estimate the impact of diversion on overdose rates over five years.Details on the model scenarios, analytic overview, sensitivity analyses, and output for the specific analysis are included within the manuscript.

Purpose
This model evaluates the effects of diverted buprenorphine on opioid overdose and mortality in North Carolina.We consider the use of diverted buprenorphine in place of heroin or counterfeit pills.As a partial opioid agonist, buprenorphine has a superior safety profile compared to full mu-receptor opioid agonists such as methadone and oxycodone with respect to respiratory depression and fatal overdose. 1Therefore, a priori, it is unclear if increased buprenorphine diversion will lead to increases in overdose deaths.Within this simulation, we estimate the 5year effect of strategies that would increase the likelihood of buprenorphine diversion on opioidrelated overdose and mortality.

Entities, State Variables, and Scales
The ABM has two types of entities-people and locations.People are referred to as "agents" and represent North Carolina residents over the age of 18.For this analysis, we modeled 10,000 agents to represent the 10.5 million residents of North Carolina.Locations include emergency departments, pharmacies, physicians, and dealers that represent physical locations where agents can receive prescribed opioids (PO), PO prescriptions, or obtain illicit PO and/or heroin.

People/Agents
Agents represent North Carolinians accessing healthcare for PO to treat acute and chronic pain, patients using MOUDS to treat opioid use disorder (OUD), or individuals misusing PO or using heroin.These agents may experience pain, uptake opioids, engage with the medical system, seek drugs from other people, and engage with drug dealers.Agents have many attributes (summarized in Table S1) that are both time invariant (e.g., primary pharmacy) and time varying (opioid use-state).Among these are variables to track prescription details, current drug supplies, as well as the agent's internal state.The state variables and sources used to inform these parameters are described in more detail within the subsections titled "Acute and Chronic Opioid Prescriptions", "Opioid use", "Treatment for opioid use disorder", "Agent Networks", and "Overdose".

Locations
At each time step (fixed at 1 day), agents can interact with a location.Locations represent emergency departments, pharmacies, physicians, and dealers (Table S2).Throughout the model run, agents interact with locations which impact the agent's state variables (e.g., agent picks up a prescription from a pharmacy and the agent's desire for an opioid is fulfilled).

Emergency Departments
The "emergency department" location type represents a physical location where agents can pick up PO.Emergency departments can distribute opioids without including a pharmacy.We estimated the number of nodes by determining the number of hospitals in North Carolina with an emergency department as of September 2021.This was cross-referenced with information from the American Hospital Directory.This number does not include free-standing urgent care centers where agents may obtain prescription opioids.

Pharmacies
The "pharmacy" location type is another physical location where agents can pick up a PO.Pharmacies fill prescriptions written by physicians.This is the sole action of the "pharmacy" entity.We estimated the number of pharmacies using data provided by the North Carolina Board of Pharmacies which conducts a census survey done annually.Data is current as of 2020.We included both in-state pharmacies (n=2,722) and out-of-state pharmacies (n=791) that obtained licensure to send prescriptions to individuals living in North Carolina for a total of 3,513 pharmacy locations.

Physicians
The "physician" location type encompasses entities eligible to prescribe opioids based on the number of licensed physicians (MD and DO degree), physician assistants, nurse practitioners, and dentists in North Carolina.The number of physicians, physician assistants, and residents in training licensed in NC was sourced from the North Carolina Medical Board with data as recent as December 31, 2020.The number of dentists was reported by the American Dental Association with data as recent as May 2021.The number of nurse practitioners was based on data from the North Carolina Board of Nursing with data from November 2021.

Dealers
The "dealer" location type includes entities that can sell illicit PO or heroin.We estimated the number of agents who sell prescription opioids or heroin illicitly based on the 2019 National Survey of Drug Use and Health.Within the survey, respondents self-report selling illegal drugs and we used a weighted national estimate to inform the number of dealers.

Temporal and Spatial Resolution and Scales
The ABM is implemented with a fixed single day time step.A 1-day time step was selected based on the assumption that an agent is primarily at one location each day.The number of daily time steps in the model is set by an input parameter.This analysis used a 5-year time horizon.
Although the model can represent agents and locations geospatially, we use an abstract 2Dspace that is not representative of the spatial properties of any real location.Rather than using physical distance, we consider a list of potential pharmacies and emergency departments.However, in selection of a primary care physician, the closest (in Euclidian space) physician is elected.Other physicians of choice are recorded as lists.

Process Overview and Scheduling
At each timestep, a person who uses opioids checks their available supply of opioids and, depending on their desire, chooses to use some or no portion of their supply.A person who is not using opioids can be in pain (acute or chronic) and can obtain a prescription for an opioid.A physician can prescribe or not prescribe opioids and chooses the dose depending on the need and regulations.Emergency departments can also distribute opioids to the patients depending on regulations.Each prescription is supposed to be written to Prescription Drug Monitoring Program (PDMP) system and the decision on whether to prescribe or not to prescribe medication can be made based on this record depending on a physician's compliance with the regulations.Dealers wait for a person who uses opioids to approach them for a desired quantity of drugs and will attempt to provide them with that dose.The dose can be a fatal amount.
Agents are connected into networks by having lists of their connections.For example, a patient has a list of physicians to go to for a new prescription.In the same way, a person who is misusing opioids has a list of known dealers.Additionally, agents are connected in "social" networks which could be used to share drugs.
The model was implemented in NetLogo and commands are executed asynchronously.Upon model initialization, agents are assigned an arbitrary unique identifier.Loops acting over all of an agent type (e.g. for all dealers do) act on agents sequentially with respect to their unique identifier.Figure S1 summarizes the model's executed processes.The go procedure is called at each timestep of the simulation.
The details of each of the process are complex and rather than following design items in the ODD protocol, we described processes and agent's behaviors in detail in the Appendix B following model initialization.

Model Initialization
The model is currently parametrized to reflect conditions in North Carolina from January 2010 to December 2019.Certain parameters were deliberately selected before the COVID-19 pandemic as the pandemic lead to temporary changes in treatment access.We have noted where this is the case.Data from the North Carolina Department of Health and Human Services (NCDHHS) on the statewide rate of fatal overdose was used to calibrate the model.Parameters linked to sources that change over time were taken from those sources as of the specified start date.
Initializing values for specific parameters are described within the below subsections.
Appendix B. Details of the model processes.

Acute and Chronic Pain Opioid Prescriptions
Within this subsection, we describe how acute and chronic pain are simulated within the model and the process through which people seek and acquire prescription opioid medication to treat pain.Agents are trifurcated by pain-type: none, acute, and chronic.Differences in pain-type impact the quantity of opioids needed to treat the underlying pain and the length of treatment needed, both internally and as estimated by a physician.

Acute pain
Acute pain is defined as pain lasting for less than three months.Examples of opioid prescription for acute pain include prescriptions following surgery, dental procedures, or physical trauma.Parameters related to acute pain are summarized in Table S3.
To estimate the number of individuals in North Carolina who experience acute pain, we used a retrospective cross-sectional analysis by Mikosz et al. from 2016 to 2017 with 18,016,259 patients with private insurance and 11,453,392 Medicaid enrollees. 2During this time period, there were 3,686,310 visits for nonsurgical acute pain (12.5% over one year) and 671,250 surgical procedures (2.27% over one year).Therefore, we estimated that around 14.79% (0.125+0.227) of the total North Carolina population experience an acute pain episode over one year.As reported by Mikosz et al., there were 3,686,310 visits for nonsurgical acute pain where 13-16% of patients were prescribed an opioid and 671,250 surgical procedures where between 55-65% of patients were prescribed an opioid. 2 Therefore, we assumed that 15% of nonsurgical visits resulted in an opioid prescription (n=552,947) and 60% of surgical visits (n=402,750) for a total of 955,697 of 4,357,560 (22%) visits resulting in an opioid prescription.On average, we assume that 22% of visits for acute pain would result in an opioid prescription.
We based the amount of opioids needed to treat acute pain on an a population-based analysis by Howard et al. which examined the quantity of opioids prescribed following surgery for patients over the age of 18 (n=2392) across 33 health systems in Michigan in 2017. 3They reported the opioids prescribed and the opioids consumed in oral morphine equivalents (OME).Median prescribed OME was 150 (IQR 135-225).Median consumed OME was 45 OME (IQR 5-125) meaning that median consumption was 27% of the prescribed amount and 24% of patients took no opioids after surgery.Based on the average prescription length, this results in a median of 6 (1-17) morphine equivalents per day.There is likely a large variance in underlying pain for patients offered an opioid prescription to treat acute pain.This is also informed by the probability of an individual seeking an additional prescription to treat acute pain (which ranged from 12-30%).To model this, we assumed that 70% of patients prescribed an opioid for acute pain had their pain sufficiently treated.The other 30% had underlying pain that did not get sufficiently alleviated and would seek additional pain medication.The amount of MME initially prescribed for acute pain was informed by Mikosz et al. 2 They report the mean daily opioid dosage was relatively constant across nonsurgical acute pain conditions-approximately 30 MME/day.Dosages prescribed for postsurgical pain ranged more widely from 37.4 MME for partial mastectomies to 64 MME for combined spinal fusion procedures.However, postsurgical pain represented only 15% of total acute pain visits.Therefore, we implemented 30 MME/day for acute pain with a range to reflect variation due to condition or postsurgical procedure.
The mean length of opioid prescription for acute pain of 7 days was based on data reported by Mundkur et al. and Dowell et al. 4,5 The implemented distribution (3 to 7 days) was based on CDC recommendations from 2016 which state that "when opioids are used for acute pain, clinicians should prescribe the lowest effective dose of immediate-release opioids and should prescribe no greater quantity than needed for the expected duration of pain severe enough to require opioids.Three days or less will often be sufficient; more than seven days will rarely be needed". 4For acute pain, Mundkur et al. reports that the probability of a refill after an initial 7day prescription ranged from 12% to 30%, depending on the condition with a refill probability of less than 25% for most conditions. 5 Table S3.Parameters related to acute pain.

Prescription-length
Length of prescription in days for acute pain 7 days (3-7 days) Mundkur et al. 5 , Dowell et al. 4

Acute-mean-prescribingtendency
Probability that an individual physician refills a prescription opioid or increases dosage of an opioid to a patient reporting acute pain after initial prescription 25% (uniform, 12-30%) Mundkur et al. 5

Chronic pain
Chronic pain is defined as pain lasting for more than three months.Parameters related to chronic pain are summarized in Table S4.The U.S. Census reported that there were 8,191,000 individuals over the age of 18 in North Carolina as of July 1, 2019.Using data from the 2019 National Health Interview Survey, Zelaya et al. estimate that 20.4% of U.S. adults had chronic pain in the past three months. 6Therefore, 1,671,000 (20.4%*8,191,000) adults in North Carolina are estimated to experience chronic pain.We based the proportion of agents with chronic pain receiving an opioid prescription on a 2020 systematic review and meta-analysis which aggregated data from 42 studies with 5,059,098 patients, mostly based in the United States, which found that 30% of patients with chronic, non-cancer pain were prescribed an opioid. 7 capture the underlying mean MME needed to treat chronic pain or the "desired" dose for agents with chronic pain, we assumed that the initial dose needed is 52 mg/day.This was informed by a randomized pragmatic randomized clinical trial with 135 Veterans referred to a specialty pain clinic who were followed for 12 months to compare the effectiveness of a conservative "hold the line" approach to prescribing opioids compared to a more liberal dose escalation strategy.At the end of the trial, the mean MED was 52 mg/day with the liberal approach compared to 40 mg/day with the maintenance approach.The initial opioid prescription dosage (50 MME) and length (7-28 days) for chronic, non-cancer pain was informed by 2016 CDC guidelines. 4The guidelines state that "clinicians should evaluate benefits and harms with patients within 1 to 4 weeks of starting opioid therapy for chronic pain or of dose escalation.Clinicians should evaluate benefits and harms of continued therapy with patients every 3 months or more frequently.If benefits do not outweigh harms of continued opioid therapy, clinicians should optimize other therapies and work with patients to taper opioids to lower dosages or to taper and discontinue opioids."However, suddenly tapering patients with chronic pain and opioid prescriptions could have unintended consequences, including individuals seeking out illicit opioids or heroin with concomitant increased risk of overdose.In response, Health and Human Services issued guidelines in 2019 that urged physicians to work with individual patients on lowering dosage or tapering use.Due to substantial changes over time and the potential risks of suddenly discontinuing an opioid for chronic pain for a non-naive patient, we assume that a high percentage (90%) of physicians would re-fill an existing prescription.

Chronic-prescriptionlength
Length of prescription in days for chronic pain 28 days (7-28 days) Dowell et al. 4

Chronic-meanprescribing-tendency
Probability that an individual physician refills a prescription opioid or increases dosage of an opioid to a patient reporting chronic pain after initial prescription 90% Dowell et al. 4 , HHS 9 , FDA 10

Opioid prescriptions to treat acute or chronic pain
All patients in the model who suffer from acute or chronic pain have a probability of seeking treatment from a physician or an emergency department.

Emergency departments
Emergency department state variables (Table S5) include the probability of distributing opioids to a patient and compliance with CDC recommended limits on opioid prescriptions.An agent accessing an ED for pain will select an arbitrary ED from the set of all EDs and visit.In this visit, the ED first probabilistically determines whether they will prescribe the agent opioids during this visit, as determined by the prescribing tendency.Before finalizing the prescription/distributing opioids to the agent, the ED completes two additional checks: a dose-cap check and a PDMP check.Both checks are probabilistically determined, governed by the dose-cap-compliance and PDMP-compliance parameters associated with the particular ED.If a dose-cap check is performed, if an agent is to be assigned a prescription > 90 MME/day, the prescription is instead capped at 90 MME.
Similarly, if a PDMP check is performed, the ED queries the PDMP.If the PDMP record for the given agent shows a combined prescription > 90 MME/day, no new prescription is written by the ED.If, however, a prescription is written for this current visit, the PDMP record is updated to reflect the new prescription written.Finally, the agent's supply of opioids are updated to reflect any distributed opioids.
Prescription tendencies for emergency departments were informed by the literature.Barnett et al. performed a retrospective analysis involving Medicare beneficiaries (n=215,678) who had an index emergency department visit from 2008-2011 and were opioid-naïve (no prescription for opioids in the previous six months). 11They found that the overall rate of opioid prescribing for patients reporting an injury (n=37,083) was 23.7% but varied by provider (low-intensity providers prescribed an opioid 12.6% compared to high-intensity providers [35.8%]). 11Therefore, we implemented a 23.7% probability with a uniform distribution from 12.6-35.8%.Borrelli et al. conducted a cross sectional observational study using data from the RI Prescription Drug Monitoring Program on controlled substance prescriptions dispensed in 2018 and found that 75% were compliant with PDMP laws. 12Hung et al. report that from 2017 to 2018, 20% of NC Medicaid enrollees were found to have been prescribed overlapping opioid and non-opioids which indicated a lack of checking the PDMP. 13Therefore, we assume that between 75-80% of physicians are compliant with PDMP laws in North Carolina.
Initial dose was also informed by the literature.An analysis of electronic health records from 2015 to 2017 (n=8,652) sought to determine if the release of 2016 CDC guidelines on opioid prescriptions was associated with changes in prescribing habits within the emergency department of an academic medical center. 14

Mean-ED-Rx
The initial mean MME prescription from an emergency department visit 29.8 Dayer et al. 14 , Sun et al. 15

Physicians
Physicians can write prescriptions for opioids, titrate up a patient's dose, and adhere to CDC's guidelines for maximum dose (Table S6).An agent will visit a physician and report chronic or acute pain.If a returning patient, the physician looks up their current (i.e., last written) prescription.If the patient reports to still be in pain with the current prescription, the physician may up-titrate the dose.We assume that if the physician titrates up, they will do so by increasing the MME dose by 25% based on a report by Gallagher et al. 17 Limited information exists for how physicians would increase or titrate opioid dosages in response to continued pain reported by a patient considering newer understanding of how high doses of opioids increase the risk of OUD and overdose.To inform our parameter estimate, we used a case report from 2007 which describes how the recommended approach to titrating an opioid dose for a patient reporting unmanaged pain would be to increase the dose by 25%.Acute pain patients and chronic pain patients are prescribed opioids with differing probabilities, as described earlier.
If a new patient, the physician probabilistically determines whether they will prescribe the agent opioids during this visit, as determined by parameters described earlier.If the physician does prescribe opioids, they do so by sampling the amount from a distribution built around parameters related to dose.Before finalizing the prescription/distributing opioids to the agent, the physician probabilistically completes two additional checks: a dose-cap check and a PDMP check.Both checks are probabilistically determined, governed by the dose-cap-compliance and PDMP-compliance parameters associated with the physician.We assumed that "emergency departments" and "physicians" have the same value for to prescription monitoring programs and maximum dosage caps recommended by the CDC.Finally, the physician updates their internal records to reflect any new prescriptions written for this patient.

acute-meanprescribingtendency chronic-meanprescribingtendency
Probability that an individual physician refills an existing opioid prescription or increases dosage of an opioid to a patient reporting continued acute or chronic pain Acute pain: mean 25%, SD 10% Chronic pain: mean 90% SD 10% Dowell et al. 4 , Mundkur et al. 5

Titrate-up-Rx
Mean percent increase in prescribed dose if patient reports continued pain 25% Gallagher et al. 17 Physicians cannot distribute opioids, only pharmacies can distribute opioids with a physician's prescription.If prescribed opioids by a physician, a patient will go to a pharmacy to fill the prescription and take the opioids over the course of a month.

Desire, tolerance, and satiation
We used ethnographic research, qualitative neurobiological descriptions and past model descriptions [18][19][20][21][22][23] to model the key internal components affecting the potential increase in dosage.Three internal state model parameters (desire, tolerance, and satiation) apply to all agents in the model and change over time to determine the amount of MME used by agents (Table S7).Due to lack of peer-reviewed literature or trial data to inform parameterization, we used qualitative data from ethnographic and clinical research, anecdotal accounts and social media data to inform parameterization and then calibrated the model to reproduce overdose and mortality rates in North Carolina from 2010 to 2019.Calibration details are in a separate section below.
Desire reflects the amount of MME sought out by the agent.While desire is related to the amount of MME needed to reach satiation, it can also incorporate the seeking of additional MME for recreational use (i.e., euphoria) or increased MME related to tolerance.For an opioidnaïve user, desire will be equivalent to the amount of MME needed to treat acute or chronic pain.
Tolerance is assumed to be 0 for all agents upon initiation of opioid or heroin use.Once a user has been exposed to opioids, the desire state variable will change over time as a function of tolerance.Desire= (tolerance*desire-tolerance-ratio) where desire-tolerance-ratio is ranged between 1.00 and 1.50.
Patients develop tolerance (i.e., the dose needed to achieve satiation) over time depending on the prescribed dose, and some patients will probabilistically become non-adherent, taking a higher dose than prescribed.Tolerance initiates at 0 for all agents but builds over time depending on the amount of opioids taken and a calibrated parameter called tolerance-inertia.Tolerance is set to (tolerance + (1 -tolerance-inertia) * (opioids-to-taketolerance)) where tolerance-inertia ranges between 0.9 and 1.0.Opioids-to-take is equivalent to desire, or supply (if less than desire), or prescribed dose (if compliant).
Satiation reflects the level of satiation with MME consumed during the current timestep and is bounded by 0 and 1. Agents are more likely to relapse (if within the "cessation of opioid use" use-state), more likely to acquire opioids through illicit pathways (i.e., from a dealer or friend), or take heroin/fentanyl at lower levels of satiation.
In summary, at every daily time step, agents will take MME (either prescribed PO, illicit PO, buprenorphine, or heroin) according to their desire and their internal variables, tolerance, desire, and satiation will then be updated accordingly.Similarly, their opioid-supply variable will be updated to reflect them having taken some dose of opioids.Consumption of opioids leads to a probability of overdose which increases with dose (further described in the subsection titled "Overdose").

Opioid Use States
The model simulates transitions through five use-states: "prescription compliant", "prescription noncompliant", "prescription opioid use disorder", "heroin use disorder", and "in treatment and/or cessation of opioid use".Each use-state is associated with a behavior within the model and changes in MME desired (Table S8).-No longer request or use PO or heroin, overdose still possible but consumption of PO or heroin not simulated -Opioid and heroin supply reset to 0 -Tolerance reset to 0 -Probability of relapse (will return to most recent use-state) dependent on treatment modality.If not receiving an MOUD, will relapse depending on the following formula:  =  − 0.99 For s, saturation, and r, the maximum relapse probability parameter If a patient's desire for opioids exceeds his or her supply, the patient may transition from the "prescription compliant" to "prescription non-compliant" use state and visit additional physicians, visit an emergency department, or buy from another patient or a dealer to take more MME than prescribed.In addition, agents may initiate heroin use if heroin is available and their desire reaches a MME threshold of 100 MME.The main progression of patients, based on the pathway described by Cicero et al. 24 , is stochastic.
Movement between different states is determined through a transition probability matrix, informed by the literature and expert opinion. 24,25We assume that between 8-16% of individuals prescribed an opioid will engage in misuse of an opioid (i.e., take more than the prescribed dose, seek out additional opioids) and between 2-14% of those prescribed an opioid will develop opioid dependence. 25The probability that an agent initiates heroin use is a function of their desire and if heroin is available within their friend network (either a friend has heroin or is connected to a dealer).Heroin initiation is modeled as a function where an agent will begin to use heroin with a 50% annual probability when their desire is equivalent to 100 MME and heroin is available within their network.
Once agents are within the "opioid use disorder" or "heroin use disorder" use-states, agents have a 25% annual probability of seeking treatment and 60% successfully connect with treatment.Those who successfully engage in treatment, will be classified as within the "in treatment and/or cessation of opioid use" state as we do not explicitly model the uptake of PO or heroin for these agents.Agents within the "in treatment and/or cessation of opioid use" usestate will have their opioid and heroin supply variables reset to 0 and their tolerance variable reset to 0. Notably, we implement a probability of opioid overdose informed by the peerreviewed literature to reflect that some agents will use opioids while engaged in treatment; however, we do not simulate the uptake of opioids while in this use-state.Treatment is further described in the subsection titled "Treatment for Opioid Use Disorder".
Agents within the "in treatment and/or cessation of opioid use" use-states will probabilistically relapse depending on treatment modality (no MOUDs, buprenorphine, methadone, or naltrexone) to their most current state of active use.Agents with a low level of satiation (ranges from 0-1, informed by desire and driven by experiencing chronic or acute pain) are more likely to relapse than agents with a high level of satiation.In this manner, our model assumes that agents experiencing untreated chronic or acute pain are more likely to relapse.
At model initialization, we assume that a certain percentage of the population is already within selected use states (e.g., OUD, in treatment for OUD).Transitions can be forward or backward.

Agent Networks
Agents are connected via links-each agent has links to one or more physicians, one or more friends who may be other patients or dealers (min-num-friends (0 to 10) and average-numfriends (0 to 10) are set on interface), and a pharmacy.Opioids are prescribed (physicians only) and opioids or heroin/fentanyl are distributed (pharmacy, emergency departments, friends, and dealers) through these links.Below we describe the networks to distribute opioids, heroin/fentanyl, and diverted buprenorphine.

Networks of illicit opioids and heroin/fentanyl
Edges are generated between agents to reflect the friend and dealer networks through which prescription opioids and heroin/fentanyl are shared or sold.Prescription opioids (POs) are dispensed by pharmacies or emergency departments.POs can be taken as prescribed or misused.POs and heroin/fentanyl are sold by dealers or shared by friends or peers.For those misusing prescription opioids, we assume that 66% received the PO from a friend or peer, 22% from a physician, 5% from a dealer, 4% from an emergency department, and 3% from multiple physicians. 26iend or peer networks are parameterized with a minimum of 0 and mean number of 2 for all agents.Networks change over time as agents can add new dealers to their social network.Adaptation takes the form of agents adding new agents who can share opioids, heroin, or diverted buprenorphine to their social network.In short, if person  0 receives drugs from a nondealer friend  1 , who buys from a dealer  , then  1 will probabilistically introduce  0 to  , thereby allowing dealers to increase their connectedness within networks.A similar process occurs for agents seeking heroin from dealers or diverted buprenorphine from dealers or friends.
Agents can "sense" the quantity of their friends' drug supply.This is analogous to some form of communication (e.g., instant messaging).This "sensing" capability is used to identify friends who might share drugs with the agent, should the agent have an inadequate supply to meet their own needs.Agents will only receive a single day's worth of opioids or heroin from a friend (vs. a dealer from whom they can receive up to seven days' worth).Heroin initiation is modeled as a function where an agent will begin to use heroin with a 50% annual probability when their desire is equivalent to 100 MME and heroin is available within their network.

Buprenorphine Diversion
If an agent is receiving buprenorphine as an MOUD, we simulate the creation of buprenorphine sharing networks (Table S9).Buprenorphine diversion is defined as the unauthorized rerouting of prescription buprenorphine to someone other than for whom it was intended either voluntarily or involuntarily and with or without exchange of money or goods. 27thin the ABM, we simulate diversion through the following steps: 1) an agent enters into buprenorphine treatment within the "cessation of opioid use" use-state, 2) the agent diverts a certain number of doses from their prescribed supply (typically 1-2 doses per week) to individuals with opioid misuse and/or OUD within their peer network, 3) the agent receiving the diverted buprenorphine will replace their typical opioid use (i.e., use of heroin/fentanyl, and/or non-medical use of prescription opioids) with the buprenorphine on the day they receive the buprenorphine.Agents seeking diverted buprenorphine will receive 1 day dose from friends or peers and up to 3 days from a dealer.We do not simulate the exchange of money, good, or services for diverted buprenorphine or the sale of illicitly manufactured buprenorphine.We assume that the agent prescribed buprenorphine and diverting their supply does not face any negative consequences related to diversion (i.e., increase in desire, punitive measures from treatment facility, etc).We assume that on the day the diverted buprenorphine is consumed, agents have the same risk of overdose as agents taking prescribed buprenorphine.
0][31][32] For the 10% of agents with illicit PO or heroin use who also use diverted buprenorphine, we assume that the agent has a 15% daily probability of using diverted buprenorphine vs. heroin/fentanyl or PO based on Carlson et al. 33 We assume that 80% of diverted buprenorphine is sourced from friend rather than a dealer. 28,34We incorporate assortative mixing within the model so that agents have ever had a buprenorphine prescription are more likely to develop connections with other agents who have ever had a buprenorphine prescription or have used diverted buprenorphine.Due to the persistent stigma associated with the use of MOUDs, we implemented this assortative mixing parameter to simulate the growth of networks of individuals who hold less stigma towards the use of buprenorphine.Additionally, this can reflect friends introducing their network to friends who are prescribed and willing to share or sell buprenorphine.

Dealers
The "dealer" location type includes entities that can sell illicit PO, heroin, or diverted buprenorphine.State variables associated with dealers primarily track their supply of available drugs (Table S10).Due to lack of data on the amount of MME within an individual dealer's supply at any one time, we informed our estimates based on expert opinion and assumptions.
Similarly, limited information exists on the exact percentage of heroin available adulterated with fentanyl.However, the percentage is likely high and growing.In addition, fentanyl-laced opioids in pill form are increasingly available through illicit markets.Based on data reported in Ohio using DEA drug seizure data and self-reported discernment of fentanyl (as confirmed by fentanyl test strips) in North Carolina as well as conversations with Dr. Jon Zibbell, we assume all heroin is currently contaminated with some amount of fentanyl. 36,37en an agent visits a dealer, they make a request for 7 days-worth of their desired MME.If the dealer has not provided the agent's desired quantity, they seek a new dealer from within their friends' network.Upon entering the "in treatment and/or cessation of opioid use" use-state, an agent will discard all opioids in their possession.Their tolerance immediately declines to 0 and they are probabilistically assigned to different types of treatment.istributed in North Carolina from 2016-2019.The NC DHHS reported in a presentation to the public that from 2019-2020, there were 8,666 cases of naloxone reversals over one year reported by the NC Department of Health and Human Services.This was an increase with the previous years (4,817 from 2018-2019 and 2,660 in 2017-2018).We calculated the probability that a naloxone kit is available to a user upon overdose as the number of kits available (113,000) by the average number of active users at any one point in time during a ten-year model run (n=408,000) to estimate that a user in North Carolina has a 27.6% probability of having naloxone available upon overdose.If naloxone is used, we assume that 87.5% of users will successfully reverse the overdose. 49

Model Calibration
To calibrate the model, we evaluated the ABM by its ability to reproduce patterns related to nonfatal and fatal overdose, treatment engagement, and additional purpose-specific patterns.In total, 75 parameters were used in calibration with a mean-squared error (MSE) approach using ten years of reported opioid-related overdose deaths in North Carolina from 2010 to 2019 (Figure S3).To do so, we used the simulated annealing algorithm implemented in BehaviorSearch.

Figure S3 .
Figure S3.Annual number of opioid overdose deaths observed in North Carolina (blue line) and simulated by the ABM (black line).

Table S5 . State variables for emergency departments
15 pre-guidelines to 29.8 (SD: 19.5) post-guidelines.To further validate, we compared this estimate to the average dispended MMEs reported by Sun et al. who examined 1,187,237 ED visits and reported an average of 110 MME (SD=115) prescribed.If we assume that the days prescribed ranged from 3-5, this would be 22-36.7 MME which is in line with the reported MME from Dayer et al.15

Table S10 . State variables for dealers
Parameters related to cessation of opioid use and treatment for opioid use disorder are summarized in

Table S11 .
39 inform the likelihood that an agent seeks treatment for opioid use disorder, we used survey data.In 2019 NSDUH public-use data, 8.08% of individuals who reported misusing opioids in the past year reported either receiving drug treatment or that they needed/made effort to get treatment/additional treatment in the past year.This is likely an undercount since it excludes individuals who may have sought treatment due to court mandate, family or job pressure, or other reasons.Therefore, we sought out additional studies to inform this probability.In a survey of 137 individuals accessing syringe service program services, Fox et al. report that more than half (57%) were interested in buprenorphine treatment.38NationalEpidemiologicSurveyonAlcoholand Related Conditions (NESARC) data from 2004-2005 reported by Blanco et al. that for individuals with a prescription opioid use disorder (n=623) there was a 11.1% probability during the first year of disorder onset, 24.5% during the first ten years, and 42.4% ever of seeking treatment.39Themediandelayto treatment-seeking was nearly 4 years.Due to the wide ranges reported, we assumed that the annual probability of seeking treatment for individuals with prescription opioid misuse or heroin use was 25% and ranged from 5-45%.Considering significant barriers related to treatment access, only a proportion of those agents seeking treatment enter treatment.We informed the number of agents entering and currently within treatment for opioid use disorder with data from The National Survey of Substance Abuse Treatment Services (N-SSATS).Due to significant disruptions to substance use treatment facilities due to the COVID-19 pandemic, we utilized the 2019 N-SSATS survey for North Carolina.In 2019, there were 214 facilities providing methadone/buprenorphine maintenance or naltrexone treatment on March 29, 2019.N-SSATS reports statistics for both OTP (federallycertified Opioid Treatment Program) and non-OTP facilities that provide MAT.In total, 24,227 patients received MAT in North Carolina in 2019 (n=17,139 within OTP facilities and 7,088 in non-OTP facilities).We also used the N-SSATS to calculate the probability of entering different types of treatment (methadone vs. buprenorphine vs. naltrexone).We based the number of individuals in North Carolina entering treatment on a news article from 2019 reporting that in North Carolina "the state health department collected demographic data on 10,333 people who entered substance abuse treatment over the past two years through the 21st Century Cures Act State Targeted Response to the Opioid Crisis Grants."We divided this by half to equal 5,167 North Carolina residents entering treatment per year.